package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Objects;

/**
 * @author ：鞠玮
 * 开发团队 ：lxh
 * 开发时间 ：2020/4/26 13:18
 * 类的名称 ：
 * 类的描述 ：
 */
@Entity
@Table(name = "print_template", schema = "lxh_crm")
public class PrintTemplate {
    private int templateId;
    private String templateName;
    private String templateContent;

    @Id
    @Column(name = "template_id", nullable = false)
    public int getTemplateId() {
        return templateId;
    }

    public void setTemplateId(int templateId) {
        this.templateId = templateId;
    }

    @Basic
    @Column(name = "template_name", nullable = true, length = 255)
    public String getTemplateName() {
        return templateName;
    }

    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    @Basic
    @Column(name = "template_content", nullable = true, length = -1)
    public String getTemplateContent() {
        return templateContent;
    }

    public void setTemplateContent(String templateContent) {
        this.templateContent = templateContent;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PrintTemplate that = (PrintTemplate) o;
        return templateId == that.templateId &&
                Objects.equals(templateName, that.templateName) &&
                Objects.equals(templateContent, that.templateContent);
    }

    @Override
    public int hashCode() {
        return Objects.hash(templateId, templateName, templateContent);
    }
}
